<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDigitalTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('digital', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title', 1000)->comment('标题');
            $table->string('first_image')->default('')->comment('首图');
            $table->string('url', 1000)->comment('图片 视频链接地址');
            $table->integer('like')->default(0)->comment('点赞数');
            $table->tinyInteger('source')->comment('来源网站');
            $table->tinyInteger('type')->default(1)->comment('类型 1:图片 2视频 3美女图');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('digital');
    }
}
